import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/public/views/public_appBar.dart';
import 'package:honeypotflutter/public/views/public_scrollView.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import 'package:honeypotflutter/publicBussine/view/bussine_button.dart';
import '../../../../router/bussine_router_url.dart';
import 'logic.dart';

class AutonymSuccessPage extends StatefulWidget {
  const AutonymSuccessPage({Key? key}) : super(key: key);

  @override
  State<AutonymSuccessPage> createState() => _AutonymSuccessPageState();
}

class _AutonymSuccessPageState extends State<AutonymSuccessPage> {
  final AutonymSuccessLogic logic = Get.put(AutonymSuccessLogic());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: MGColors.whileColor,
      appBar: HLAppBar(navigationTitle: "实名认证", showBackLeading: false, showBottomLine: true),
      body: HLScrollView(
        crossAxisAlignment: CrossAxisAlignment.center,
        padding: EdgeInsets.only(left: 16, right: 16, top: 40),
        children: [
          Image.asset(
            MGImage.image("public_success"),
            width: 90,
          ),
          SizedBox(height: 20),
          Text(
            "提交成功",
            textAlign: TextAlign.center,
            style: TextStyle(
              fontWeight: FontWeight.bold,
              color: MGColors.text1Color,
              fontSize: MGFont.titleFont2,
            ),
          ),
          SizedBox(height: 30),
          Container(
            width: double.infinity,
            child: Text(
              "后台系统正在审核您提交的信息，等待通过后 即实名成功",
              textAlign: TextAlign.center,
              style: TextStyle(
                color: MGColors.text3Color,
                fontSize: MGFont.textFont1,
              ),
            ),
          ),
          MGButton(
            margin: EdgeInsets.only(top: 50),
            title: "我知道了",
            buttonAction: () {
              Get.until((route) => Get.currentRoute == MGRouterUrl.index);
            },
          )
        ],
      ),
    );
  }

  @override
  void dispose() {
    Get.delete<AutonymSuccessLogic>();
    super.dispose();
  }
}
